package com.domain;

import java.util.List;

/**
 * 分页实体类
 * 记录页面信息
 */
public class PageBean<T> {

    private Integer pageSize;   //页面大小
    private Integer currentPage; //当前页面
    private Integer totalPage;  //总页面数
    private int start;  //起始记录条
    private List<T> list;   //查询的东西

    public PageBean(Integer pageSize, Integer currentPage, Integer totalPage, int start, List<T> list) {
        this.pageSize = pageSize;
        this.currentPage = currentPage;
        this.totalPage = totalPage;
        this.start = start;
        this.list = list;
    }

    @Override
    public String toString() {
        return "PageBean{" +
                "pageSize=" + pageSize +
                ", currentPage=" + currentPage +
                ", totalPage=" + totalPage +
                ", start=" + start +
                ", list=" + list +
                '}';
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public Integer getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(Integer totalPage) {
        this.totalPage = totalPage;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }
}
